var EBPriority = Class.create( );
EBPriority.prototype = {

	initialize: function( ) {
		this.slider = $RGC().sliderContainer;
		this.handler = $RGC().sliderHandler;
		this.priorityLevels = $RGC().priorityLevels;
		this.level = this.priorityLevels[0];
	},
	
	getLabel: function(n) {
		return this.priorityLevels[n-1];
	},
	
	startSlider: function( ) {
		var rm = this.priorityLevels.length;
		var priorityValues = new Array();
		for(i=1; i<=rm; i++) {
			priorityValues[i-1] = i;
		}
	    new Control.Slider(this.handler,this.slider,{
	    	range:$R(1,rm),
        	values:priorityValues,
	      	onSlide:function(v){this.level = this.getLabel(v);}.bind(this),
	      	onChange:function(v){this.level = this.getLabel(v); $RGE('days-data').setParams(); $RGE('days-data').load();}.bind(this)
	    });	
	}

}
